Goto

Collaborating Authors

 gradient descent


Transformers with CoT Discover Heavy-Ball Acceleration Through Training

arXiv.org Artificial Intelligence

Transformers have demonstrated remarkable success across a wide range of applications, including natural language processing (Vaswani et al., 2017) and computer vision (Dosovitskiy, 2020). These models have also exhibited complex reasoning abilities, particularly in mathematical problem solving and coding (Chowdhery et al., 2023). Chain-of-thought (CoT) reasoning has emerged as a key approach for enhancing such reasoning capabilities, enabling models to generate intermediate reasoning steps before producing the final answer (Wei et al., 2022; Kojima et al., 2022). To theoretically understand the capabilities of transformers, recent works have viewed transformers as "algorithm executors." In particular, transformers have been shown to implement optimization algorithms for in-context learning tasks, where the context is modeled as the training dataset for a learning problem. Aky urek et al. (2022); Von Oswald et al. (2023) empirically demonstrated that transformers can perform in-context linear regression via gradient descent. Zhang et al. (2024) theoretically showed that one-layer transformers can be trained to perform in-context linear regression, while Ahn et al. (2023) showed that deep transformers can be trained to implement preconditioned gradient descent. Guo et al. (2024); Bai et al. (2023) further demonstrated the in-context learning capabilities of transformers by constructing multi-head ReLU transformers that implement a variety of learning algorithms. Gatmiry et al. (2024) showed that looped transformers School of Computing & Data Science, The University of Hong Kong; chriscai@connect.hku.hk


Early learning in large residual networks

arXiv.org Artificial Intelligence

We study the early training dynamics of nonlinear residual networks with blocks of zero hidden layers as a model of more general residual networks. We analyze networks in a sequential limit where first width and depth diverge, then the number of training data points diverges, and finally the input dimension diverges. This is a more refined setup compared to the typical mean-field theory analysis in which depth and width diverge but the number of training datapoints and input dimension are fixed. Our main technical result is a diagrammatic computation of both the network output and the hidden representations after the few steps of gradient descent in terms of the statistics of inner products of inputs from the training set. One of our principle conceptual findings is a negative result: in the limit of large input dimension the network output can learn only a linear function of its inputs early in training since higher learned monomials are more and more suppressed in the input dimension and vanish in the large dimension limit. This suggests that mean-field limits of ResNets are surprisingly rigid in the regime of high input dimension and may not be sufficient toy models for understanding feature learning. Finally, we investigate how to ensure hyperparameter transfer for the learning rate as a function of dataset size and input dimension. We test our predictions numerically and find excellent agreement with our theory.


Curvature-Scaled Sharpness-Aware Minimization: Convergence Beyond Smoothness

arXiv.org Artificial Intelligence

Sharpness-Aware Minimization (SAM) has established itself as a widely used method for training deep neural networks. Despite its popularity, existing convergence guarantees for SAM-type methods require smoothness, a restrictive assumption. Generalized smoothness conditions have recently been proposed in the analysis of gradient methods but remain underexplored for SAM. To analyze the effect of SAM's perturbation under generalized smoothness, we use relative gradient distortion to quantify how the sharpness-aware direction departs from the original gradient. Under $(L_0,L_1)$-smoothness, we show that this distortion can become unbounded near stationarity for SAM and at large gradients for its unnormalized variant (USAM), with examples where SAM cycles and USAM diverges. We then establish a necessary condition for uniform distortion control among perturbations along the gradient whose nonnegative multipliers depend only on its norm. Motivated by this condition, we propose Curvature-Scaled SAM (CS-SAM), which scales both the perturbation and the descent step by suitable curvature upper bounds, and prove that it uniformly bounds the distortion. Under both $(L_0,L_1)$- and $(H_0,H_1)$-smoothness, we establish deterministic $\mathcal{O}(1/T)$ rates for the best squared gradient norm on nonconvex objectives, last-iterate $\mathcal{O}(1/T)$ rates for the function gap on convex objectives with a minimizer, and linear convergence under the Polyak-Lojasiewicz condition. With zero perturbation, our guarantees recover the rates for gradient descent with $(L_0,L_1)$- or $(H_0,H_1)$-based step-sizes. Minibatch experiments on computer vision tasks demonstrate competitive performance for both variants, with the $(H_0,H_1)$ variant achieving the highest mean best-test accuracy in all four settings against tuned SAM and USAM with constant and cosine annealing schedules.


A Boundary-Layer Mechanism for One-Third Scaling in Online Softmax Classification

arXiv.org Artificial Intelligence

ABSTRACT Hard-label classification is usually trained with smooth surrogate losses such as softmax cross-entropy. We isolate a mechanism by which this mismatch between smooth surrogate and discrete labels produces power-law learning curves for a one-layer softmax student trained by online SGD on Gaussian inputs with argmax teacher labels. In the thermodynamic limit, the dynamics reduce to a growing student-teacher alignment and a residual student variance sustained by SGD noise. At late times, only shrinking layers of examples around teacher decision boundaries remain active. The error law is an online-noise effect. The loss law persists without gradient noise. Correlated Gaussian inputs and whitened pretrained features change transients, not the late-time decay. Experiments with deep neural networks can show compatible error scaling. The mechanism is asymptotic and complementary to spectral explanations and data-statistics explanations of neural scaling laws. 1 INTRODUCTION Scaling ...


Stochastic Optimization Under Power-Law Spectra: Tight Bounds and Shuffling Analysis

arXiv.org Artificial Intelligence

Recent work has established that power-law spectral conditions on data enable tight convergence bounds for deterministic gradient descent, resolving the conflict between classical exponential bounds and observed power-law learning curves. In this work, we extend this result to the stochastic regime of high-dimensional machine learning. We provide two main contributions: (1) We generalize the power-law spectral theory to Stochastic Gradient Descent (SGD), showing that the same spectral exponents govern stochastic dynamics; (2) For the fundamental case of isotropic Gaussian data, we provide a precise analysis of data shuffling, deriving exact constants that prove Single Shuffle is strictly superior to Flip-Flop and IID sampling.


Learning reveals invisible structure in low-rank RNNs

arXiv.org Artificial Intelligence

Learning in neural systems arises from synaptic changes that reshape the representations underlying behavior. While low-rank recurrent neural networks (RNNs) have emerged as a powerful framework for linking connectivity to function, a theoretical understanding of their learning process remains elusive. Here, we extend the low-rank framework from activity to learning by deriving gradient-descent dynamics directly in a reduced overlap space. We formulate a closed-form, low-dimensional system of ODEs that governs learning in this space, exact for linear RNNs and asymptotically exact for nonlinear RNNs in the large-$N$ Gaussian limit. Central to our analysis is a distinction between two classes of overlaps: loss-visible overlaps, which fully determine network activity, output, and loss, and loss-invisible overlaps, which do not affect function but are required to describe learning. We illustrate the consequences of this decomposition through two phenomena. First, we show that learning can serve as a perturbation that exposes differences in connectivity between functionally equivalent networks. Second, we show that loss-invisible overlaps can act as memory variables that encode training history, and characterize the conditions under which this occurs. Finally, we present several testable predictions for biological learning experiments derived from our theory.


On the Dynamics of Delayed Generalization in Linear Models

arXiv.org Artificial Intelligence

Atreya Vedantam Nataraj Das Chandrasekhar Lakshminarayanan Indian Institute of Technology Madras Abstractet al. (2024), a principled theory of this delayed generalization is still missing. Delayed generalization, where training accu-A natural starting point is binary classification on linracy becomes nearly perfect substantially be-early separable data, trained by gradient descent with fore test accuracy, has often been studieda constant step size η on a smooth, decreasing loss in the context of the depth and composi-with an exponential tail. They argued that this tion can occur in simpler settings. We showexplains why optimizing the logistic or cross-entropy that it can arise in a linear model trainedloss helps even after the training error reaches zero. We give a finite-time analysis of delayed generalization in linear models. Our findings acterize the finite-time hyperplane dynamics are summarized below. How does a linear model learn linearly a generalization phase. The weights converge in direction to the rection is sufficient for the unlearning phase maximum-margin vector while their norm grows. In the support vector dominated bias passes through three phases: Phase 1: population phase, we characterize the hyperplane dydominated (Theorem 4.5), Phase 2: support-vector namics. The time scale in these dynamics causes delayed generalization. We validate dominated unlearning (Theorem 4.6), and Phase our theory through controlled experiments 3: support-vector dominated generalization (Theorem 4.7). Our results provide a unified characterization of the asymptotic Answer. The residual, i.e., the weights minus their growing max-margin component, converges at rate and finite-time dynamics underlying delayed Here t is the iter-generalization in linear models. This con1 INTRODUCTIONvergence guarantees that Phase 2 has begun (Theorem4.4). We validate these predic-(2017); Zhang et al. (2017); Papyan et al. (2020); Ma tions in controlled experiments and in a deep networket al. (2017); Kaplan et al. (2020).


The Fourth Quadrant: A Stylized View of Benign Misfitting

arXiv.org Artificial Intelligence

Training error is what we can observe on a training set; test error is the quantity we care about. We study squared-error linear regression in a deterministic $(d+1)$-dimensional single-spike model. Each training vector has spike coordinate $\sqrtγ$, $γ>1$, and equal-norm, mutually orthogonal nuisance components. Training labels are $1$. Fresh test points are centered Gaussian with covariance $\operatorname{diag}(γ,1,\ldots,1)$ and noise-free label $x[1]/\sqrtγ$. We compute the exact train--test tradeoff for linear predictors in the training span. When the spike direction is unknown, allowing all linear predictors does not improve this tradeoff, on average or in the worst case over directions consistent with the data. There is a range of training-set sizes where every span predictor that generalizes well must fit the training data worse than the zero predictor. We call this benign misfitting, or the fourth quadrant. At its sharpest, test error tends to zero while training error diverges, with both zero-predictor errors normalized to one. The best span predictor begins to generalize when $n\gg d/γ^2$, while interpolation needs $n\gg d/γ$. In the intervening window $d/γ^2\ll n\ll d/γ$, useful span prediction lies beyond interpolation: training predictions overshoot the labels. One-pass stochastic gradient descent with a large constant learning rate attains small test error throughout this window, matching the best span predictor up to a logarithmic factor, while leaving large empirical training error. Finally, the nuisance component responsible for the training misfit also controls adversarial sensitivity.


Retrieval-Centric Deep Learning in Growing Nonparametric Neural Networks

arXiv.org Artificial Intelligence

We investigate a general-purpose layer for deep learning that, instead of compressing arbitrary-size training data into fixed-size weight matrices, stores a new pair of key-value representations for every data point during training, and retrieves and recombines these representations through an attention mechanism at inference time-- resulting in a growing neural net (NN). While Irie et al. [1] have put forward this perspective from the classic duality expressing any linear layer in a deep NN trained by gradient descent as linear attention (LA) over the training data points, replacing LA by more powerful attention functions, as they suggest, turns out to be nontrivial: we show that naively applying learning rules from the LA case to advanced kernels does not lead to principled optimization. Here we fill this gap and develop functional gradient-based learning rules for kernelized attention layers, based on radial basis function (RBF) and softmax-like kernels--establishing the principled "retrieval-centric deep learning" (RCDL) paradigm. Empirically, we demonstrate the promising performance and learning-efficiency of RCDL on image classification and synthetic teacher-student learning tasks. Moreover, we show that replacing LA in the dual form of NNs by advanced LA variants, namely MesaNet/DeltaNet, yields a formal connection to recently proposed optimizers for conventional fixedsize NNs, offering a novel perspective on deep learning optimization.


Checkable NTK Positivity and Finite-Width Gradient Descent for Scalar- and Vector-Valued PINNs with Strong-Form, Weak-Form, and Nonlocal Linear Constraints

arXiv.org Artificial Intelligence

We give checkable positive-definiteness criteria for the limiting neural tangent kernel (NTK) and high-probability finite-width gradient-descent guarantees for scalar- or vector-valued physics-informed neural networks (PINNs) with linear constraints. The constraints may be strong-form differential rows of any fixed finite order, including coupled systems, with any linear initial or boundary conditions; weak-form residual and boundary functionals; or finite-measure nonlocal observations such as integral, nonlocal-diffusion, and Dirac-data rows, all in any dimension. For each class, positive definiteness of the limiting NTK is equivalent to a rank condition on a finite coefficient, functional, or moment matrix of the fixed design: a certificate computed before training that detects structural zero modes. The model hypotheses are those of an ordinary two-layer PINN, a smooth nonpolynomial activation with bounded symmetric initialization, and are met by standard choices such as $\tanh$ with uniform initialization. Given a certificate, explicit width and step-size conditions ensure, with high probability, that the empirical NTK retains at least half the limiting gap and that full-batch gradient descent decreases the training loss geometrically at every iteration. Controlled experiments check the certificates and the finite-width mechanism.